/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.team1160.beta.season2011.output.kicker;

/**
 * This class takes care of the low level programming to articulate the kicker.
 * @author CJ
 */
public class Kicker {
    Piston kicker, latch;

    public Kicker(int kfront,int kback, int lfront, int lback) {
        kicker=new Piston(kfront,kback);
        latch=new Piston(lfront,lback);
    }

    public void kick(KickerCommand command){
        if(command.get(KickerCommand.KICKER)!=0){
            kicker.fire();
        } else {
            kicker.retract();
        }

        if(command.get(KickerCommand.LATCH)!=0){
            latch.fire();
        } else {
            latch.retract();
        }
    }
}
